//@flow

import { 
    DeviceEventEmitter,
 } from "react-native";
import { DataProps } from "./requestAnalyzer";
import * as Noti from "./requestAnalyzer.contant";
import { genId } from "../../util/common";

/**
 * 请求、响应触发器
 */
export class RequestEmit {
    /**发送请求触发 */
    static RequestNoti(data:DataProps){
        DeviceEventEmitter.emit(Noti.UPDATE_ADD_REQUEST_SOURCE_NOTI,data)
    }
    /**请求响应触发 */
    static ResponseBack(data:DataProps){
        DeviceEventEmitter.emit(Noti.UPDATE_RESPONSE_BACK_NOTI,data)
    }
}